package com.py;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;

import java.util.Calendar;
import java.util.Date;
import java.util.Random;
import java.util.Timer;

public class DemoApplication {
    private static Logger logger = LoggerFactory.getLogger(DemoApplication.class);
    private static long period = 1000 * 60 * 15 ;
    public static void main(String[] args) {
        TimeTask task = new TimeTask();
        Timer timer = new Timer();
        Calendar calendar= Calendar.getInstance();
        Date firstTime = calendar.getTime();
        logger.info("定时任务线程-启动");
        timer.schedule(task,firstTime,period);
    }

}
